﻿using System;
using System.Xml.Serialization;

namespace EpiNEXT.Core.Fields
{
    [Serializable()]
    public class RelateButtonField : CommandButtonField
    {
        #region Members
        private Form _relatedForm = null; // TODO: See if this can be loaded at some point so we don't need IDs
        private Guid _relatedFormId = new Guid("00000000000000000000000000000000");
        #endregion // Members

        /// <summary>
        /// Constructor
        /// </summary>
        public RelateButtonField()
            : base() 
        {
            PromptFontSize = Constants.DEFAULT_PROMPT_FONT_SIZE;
            Command = ButtonCommands.OpenForm;
        }

        /// <summary>
        /// Represents the ID of the form that this relate button links to
        /// </summary>
        [XmlElement]
        public Guid RelatedFormId
        {
            get
            {
                return this._relatedFormId;
            }
            set
            {
                this._relatedFormId = value;
            }
        }
    }
}
